<template>
	<view class="bcg">
		<view class="content">
			<view class="">
				userID:
				<input v-model="params.userID" type="text" placeholder="请输入userID" />
			</view>
			<view class="login">
				<view class="btn" @click="handleLogin">登录</view>
			</view>
		</view>
	</view>
</template>

<script>
	import TIMManager from '@/common/tim.js';
export default {
	data() {
		return {
			statusBarHeight: uni.getStorageSync('heights'),
			params: {
				userID: ''
			}
		};
	},
	onLoad() {},
	methods: {
		handleLogin() {
			TIMManager.login(this.params.userID).then(res=>{
				console.log(res);
				if(res.code ==0){
					uni.switchTab({
						url:'/pages/index/index'
					})
				}
			})
		}
	}
};
</script>

<style lang="scss">
page {
}
.title_img {
	width: 217rpx;
	height: 217rpx;
	margin: 0 auto;

	image {
		margin-top: 300rpx;
		width: 217rpx;
		height: 217rpx;
		border-radius: 10rpx;
	}
}

.content {
	.con_flex {
		display: flex;
		width: 500rpx;
		justify-content: space-between;

		.texts {
			font-size: 36rpx;
			color: #ffffff;
			font-weight: bold;
		}

		.text {
			font-size: 36rpx;
			color: #000000;
		}
	}
}

.login {
	width: 70%;
	margin: 440rpx auto;

	.item {
		display: flex;
		background-color: #ffffff;
		margin-bottom: 26rpx;
		align-items: center;
		border-radius: 10rpx;

		input {
			font-size: 30rpx;
		}

		.yz {
			width: 30%;
			height: 70rpx;
			border-radius: 8rpx;
		}

		.ts {
			font-size: 30rpx;
			color: #000000;
			margin: 20rpx;
		}
	}

	.btn {
		width: 500rpx;
		height: 86rpx;
		background: linear-gradient(#d81e11 0%, #d81e06 100%);
		margin: 240rpx auto;
		color: #ffffff;
		font-size: 30rpx;
		font-weight: bold;
		line-height: 86rpx;
		text-align: center;
		border-radius: 10rpx;
	}
}
</style>
